<nav>
  <%= tabs_tag(:namespace => :sub_nav, :open_tabs => {}, :builder => MenuTabBuilder) do |tab| %>
    <%= tab.account_signin '<i class="fa fa-lg fa-fw fa-pencil"></i> <span class="menu-item-parent"> 签到统计</span>'.html_safe, admin_account_signins_path if current_admin.can?(controller: "admin/account_signins") %>
    <%= tab.download '<i class="fa fa-lg fa-fw fa-download"></i> <span class="menu-item-parent"> 下载统计</span>'.html_safe, admin_downloads_path if current_admin.can?(controller: "admin/downloads") %>
    <% if current_admin.can?(controller: "admin/traffics") %>
    <%= tab.search_traffics '<i class="fa fa-lg fa-fw fa-list-ul"></i> <span class="menu-item-parent"> 流量明细</span>'.html_safe, search_admin_traffics_path %>
    <%= tab.stat_traffics '<i class="fa fa-lg fa-fw fa-dashboard"></i> <span class="menu-item-parent"> 流量统计</span>'.html_safe, stat_admin_traffics_path %>
    <% end %>
    <%= tab.connections '<i class="fa fa-lg fa-fw fa-exchange"></i> <span class="menu-item-parent"> 连接统计</span>'.html_safe, admin_app_connections_path if current_admin.can?(controller: "admin/app_connections") %>
    <%= tab.watching '<i class="fa fa-lg fa-fw fa-play"></i> <span class="menu-item-parent"> 观看统计</span>'.html_safe, admin_watchings_path if current_admin.can?(controller: "admin/watchings") %>
    <%= tab.message_warnning '<i class="fa fa-lg fa-fw fa-envelope"></i> <span class="menu-item-parent"> 短信统计</span>'.html_safe, admin_message_warnnings_path if current_admin.can?(controller: "admin/message_warnnings") %>
    <%= tab.recommands '<i class="fa fa-lg fa-fw fa-thumbs-up"></i> <span class="menu-item-parent"> 推荐统计</span>'.html_safe,admin_recommands_path if current_admin.can?(controller: "admin/recommands") %>    
    <%= tab.wifi_logs '<i class="fa fa-lg fa-fw fa-arrow-down"></i> <span class="menu-item-parent"> 公共热点日志</span>'.html_safe,admin_wifi_logs_path if current_admin.can?(controller: "admin/wifi_logs") %>
  <% end %>
</nav>